﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site/Master/Pop.Master" AutoEventWireup="true"
    CodeBehind="Register.aspx.cs" Inherits="ECommerce.Web.Site.Register" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="styles/register.css" rel="stylesheet" type="text/css" />
    <script src="../Common/Js/Calendar.js" type="text/javascript"></script>
    <script type="text/javascript">
        function reset()
        {
            $(":text").val("");
        }

        function validate()
        {
            if ($("#<%=LoginName.ClientID %>").val() == "")
            {
                alert("请输入用户名");
                return false;
            }
            if ($("#<%=Password.ClientID %>").val() == "")
            {
                alert("请输入密码");
                return false;
            }
            if ($("#<%=Password.ClientID %>").val().length < 6)
            {
                alert("密码长度不得小于６位");
                return false;
            }
            if ($("#<%=Password.ClientID %>").val() != $("#<%=Password2.ClientID %>").val())
            {
                alert("两次密码不一样");
                return false;
            }
           
            if ($("#<%=Email.ClientID %>").val() == "")
            {
                alert("请输入Email");
                return false;
            }

            var email = $("#<%=Email.ClientID %>").val();
            if (email.indexOf("@") < 0 || email.indexOf(".") < 0)
            {
                alert("Email格式不正确");
                return false;
            }
            return true
            
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="pnlMain" runat="server">
    
     <div id="Login">
        <p>
            <span class="left weight">&nbsp;&nbsp;会员注册</span><span class="right"><a href="javascript:top.delDivFrm();">关闭</a></span></p>
        <div class="Logincon">
            <ul>
                <li><span class="name">用户名：</span><span class="frameb"><asp:TextBox ID="LoginName"
                    runat="server"></asp:TextBox></span><span
                    class="star">*</span></li>
                <li><span class="name">设置密码：</span><span class="frameb"><asp:TextBox ID="Password"
                    runat="server" TextMode="Password"></asp:TextBox></span><span
                    class="star">*</span></li>
                <li><span class="name">确认密码：</span><span class="frameb"><asp:TextBox ID="Password2"
                    runat="server" TextMode="Password"></asp:TextBox></span><span
                    class="star">*</span></li>
               

                <li><span class="name">E-Mail：</span><span class="frameb"><asp:TextBox ID="Email"
                    runat="server"></asp:TextBox></span><span    class="star">*</span>
                    </li>
                      
                <li>         
                    <asp:LinkButton CssClass="button1" OnClientClick="return validate()" onclick="btnSave_Click"  ID="LinkButton1" runat="server"><img src="images/1.jpg" /></asp:LinkButton>
                    
                    <%--<asp:Button ID="btnSave" runat="server" Text="填好了，开始注册" CssClass="button1" 
                        OnClientClick="return validate()" onclick="btnSave_Click" /><input type="button" value="重新填写"
                        class="button" onclick="reset()" />--%>
                 </li>
            </ul>
        </div>
    </div>
    </asp:Panel>
</asp:Content>
